public class Test {
    public static TCPLink link;
    private static String serverHost;
    private static int serverPort;
    private static String accountName;
    private static String accountPassword;

    public static void main(String[] args) {
        if (args.length == 2) {
            new ClientLoadIn(args[0], args[1]);
        } else if (args.length == 1) {
            new ClientLoadIn(args[0], null);
        } else if (args.length == 0) {
            new ClientLoadIn(null, null);
        } else if (args.length > 2) {
            System.err.println("输入参数为[Host Port]");
        }
    }

    public static void setAccountName(String name) {
        accountName = name;
    }

    public static String getAccountName() {
        return accountName;
    }

    public static void setAccountPassword(String password) {
        accountPassword = password;
    }

    public static String getAccountPassword() {
        return accountPassword;
    }

    public static String getServerHost() {
        return serverHost;
    }

    public static void setServerHost(String h) {
        serverHost = h;
    }

    public static int getServerPort() {
        return serverPort;
    }

    public static void setServerProt(int p) {
        serverPort = p;
    }

    public static void createLink() {
        link = new TCPLink(serverHost, serverPort);
    }
}
